home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 008a / timem120.zip / TIMEM.DOC < prev    next >
Text File  |  1991-07-22  |  11KB  |  229 lines

  1.          ┌─────────────────────────────────────────────────────────────┐
  2.          │ Trademarked names are the property of the respective owners │
  3.          └─────────────────────────────────────────────────────────────┘
  4.  
  5.                        (c) Copyright 1991 FM de Monasterio
  6.                      Licensed Material - All rights reserved
  7.  
  8.                               TIMEM version 1.20
  9.                               ------------------
  10.  
  11.    1. SUMMARY
  12.  
  13.    TIMEM is a utility to measure memory access times over a range of memory
  14.    as small as 1 kb or as large as 1 Mb.  It is useful for the selection of
  15.    an upper-memory block (UMB) for resident utilities capable of installing
  16.    themselves in upper memory (via an XMS manager) and of selecting a lower
  17.    limit for the UMB.
  18.  
  19.  
  20.  
  21.    2. GENERAL INFORMATION
  22.  
  23.    Several types of addressable memory are found in iAPX 80x86 CPUs.  In all
  24.    DOS-compatible machines, however, the first megabyte (1 Mb = 1,024 kb) of
  25.    memory comprises the initial 640 kb of address space used by DOS, and the
  26.    remaining 384 kb of address space used by hardware subsystems and by BIOS
  27.    routines.  The addressable megabyte is referred to as conventional memory
  28.    and its 384-kb subspace as upper memory area (UMA) or high-DOS memory.
  29.  
  30.              0 kb                          640 kb           1024 kb
  31.                             DOS                    UMB       
  32.               ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  33.  
  34.  
  35.  
  36.    In the IBM AT and compatibles, which can support a physical address space
  37.    larger than 1,024 kb, additional memory is located above the initial 1 Mb
  38.    of space, up to a physical address space of 16 Mb in i286 and i386SX CPUs
  39.    and 4 Gb in i386 CPUs.  The additional addressable RAM is called extended
  40.    memory and is subdivided into a high memory area, which is the initial 64
  41.    kb area immediately above the 1-Mb limit, i.e. from 1,024 kb to 1,088 kb,
  42.    and the extended memory blocks (EMBs), located above the physical address
  43.    at 1,088 kb.
  44.  
  45.                 1Mb                                         16Mb-4Gb
  46.                                 Extended memory               
  47.               ▒▒▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  48.               
  49.              0 kb
  50.  
  51.  
  52.    Irrespective of the CPU, DOS runs in an 086-compatible mode known as real
  53.    mode. In such a mode, where addressable memory is seen as consisting of a
  54.    series of 64-kb segments, memory addresses are made up of two portions: a
  55.    16-bit SEGMENT, between 0 and 65,535 (or FFFFh in hexadecimal), and a 16-
  56.    bit OFFSET, which is the distance in bytes (between 0 and FFFFh) from the
  57.    address to the first byte of the segment.
  58.  
  59.    By changing segment:offset values, up to 1 Mb of memory can be addressed;
  60.    given the inherent overlap of such a method of addressing, it is possible
  61.    to point to a given locale in memory, such as the beginning of the second
  62.    kilobyte of the UMA space (641 kb) by more than one segment:offset value,
  63.    e.g. A400:0000h, A000:0400h, 9FFF:0410h, 9400:C400h, etc.  This ambiguity
  64.    can be resolved by using physical addresses, in which these two parts are
  65.    combined to form a 20-bit address by multiplying the segment by 16 and by
  66.    adding the offset to it. (The highest possible 20-bit number is 1,024 kb,
  67.    which is why this is the maximum space of [086] conventional memory.)
  68.  
  69.                                -----------------
  70.  
  71.    3. PROGRAM INFORMATION
  72.  
  73.    TIMEM measures access time to a range of conventional memory blocks, each
  74.    of 1 kb length, starting at a user-specified, zero-offset segment between
  75.    0 and FFFFh, and ending at higher zero-offset segment either specified by
  76.    the user or set automatically by the program.
  77.  
  78.    TIMEM is useful to measure access time in sufficient detail to select the
  79.    best UMB base segment in which to install those resident programs capable
  80.    of loading themselves into an upper memory block (UMB) via an XMS manager
  81.    and of selecting a lower high-memory limit for the UMB.  This permits the
  82.    avoidance of high-memory areas whose timings might be considered too slow
  83.    for a particular resident's task.
  84.  
  85.    XMS services are implemented in some 386 memory managers, such as QEMM386
  86.    (Quarterdeck) and 386MAX (Qualitas), and the prototype XMS manager HIMEM.
  87.    SYS (Microsoft).  UMB functions of the XMS manager can be tested with the
  88.    UMAX utility.
  89.  
  90.                                    ---------
  91.  
  92.    Because of intrinsic variations, timings should be repeated several times
  93.    to obtain a more representative evaluation.  The results represent micro-
  94.    seconds per kilobyte (µs/kb) for the particular metric used in this test,
  95.    and are sent to the video display via DOS.  This output can be redirected
  96.    to a file or the printer through the DOS redirection command > or >> when
  97.    executing the program.
  98.  
  99.    TIMEM uses the microcomputer's timer chip for these measurements. The IBM
  100.    PC family uses an 8253 (or 8254) timer chip to tally system clock pulses,
  101.    and for DMA memory-refresh operations, and speaker output.  Access timing
  102.    measurements do not affect the memory contents, but (because of the timer
  103.    reprogramming) may introduce small inaccuracies in the system-clock pulse
  104.    count maintained by the BIOS and used by DOS.  These inaccuracies are not
  105.    permanent and disappear when the CPU is rebooted; their occurrence can be
  106.    minimized by synchronizing timing loops with the system clock pulses (see
  107.    switch S below), although this results in a penalty in speed performance.
  108.  
  109.    TIMEM assumes the system timer is an 8253-compatible chip. If this is not
  110.    the case (as in IBM PS/2s), switch P helps to avoid measurement errors in
  111.    computers not compatible with the IBM PC hardware standard.
  112.  
  113.                                -----------------
  114.  
  115.    4. USAGE
  116.                    TIMEM [seg1[seg2]] [/switches] [;comments]
  117.  
  118.  
  119.    seg1    The starting zero-offset segment in 4-digit hexadecimal notation
  120.            ranging between 0 and FFFF.  Default: Null argument = A000.
  121.  
  122.    seg2    The final zero-offset segment in 4-digit hexadecimal notation of
  123.            memory range to be timed.  The final segment must be higher than
  124.            the initial one.  Default: Null argument = (seg1+15 kb), invalid
  125.            argument = FFFF.
  126.  
  127.  
  128.    SWITCHES
  129.  
  130.    The switches are not case sensitive, may be given in any order, and must
  131.    be preceded by any ASCII character between space ( ) and slash (/):
  132.  
  133.  
  134.    /N      NonStop listing of access timing data.  Use this switch when the
  135.            data will be send to a file via DOS redirection commands.
  136.  
  137.    /P      Do not assume timer is an 8253-compatible chip (e.g., IBM PS/2).
  138.            This switch may introduce a small error when timing a very large
  139.            range of memory in a very slow CPU.
  140.  
  141.    /S      Synchronize timing loops and the system clock pulses to decrease
  142.            the possibility of introducing inaccuracies in the time count of
  143.            DOS when timing a large memory range in a slow CPU.  (Such small
  144.            inaccuracies are temporary and disappear upon rebooting.)  Since
  145.            the clock pulses only every 55 ms, this switch slows down TIMEM.
  146.  
  147.  
  148.    Comments may be added at the end of the command line invoking the program,
  149.    after the desired switches.  The comments, which may help clarifying batch
  150.    files, must be preceded by a semicolon (;), and are ignored by TIMEM.
  151.  
  152.    NOTE:
  153.    Do not use the redirection (<>) or pipe (|) command character of MS-DOS in
  154.    the comments since MS-DOS will try to implement the implied redirection or
  155.    pipe request.
  156.  
  157.  
  158.  ------------------------------------------------------------------------------
  159.  
  160.    REGISTRATION
  161.  
  162.    These programs and the documentations (the "Software") are the copyrighted
  163.    property of FM de Monasterio (the "author"), who provides the Software and
  164.    licenses its use.  All rights are reserved.
  165.  
  166.    If you would like to use this Software, please send to the address below a
  167.    US$5.00 check marked "For Deposit Only" and payable to "PATIENT CARE FUND,
  168.    CHILDREN'S HOSPITAL" of Washington, DC.  Users who donate to this fund are
  169.    authorized by the author to keep and use the utility under the limitations
  170.    described below.
  171.  
  172.                                                    FM de Monasterio
  173.                                                    P.O. Box 219
  174.                                                    Cabin John, MD 20818-0219
  175.    DISTRIBUTION
  176.  
  177.    You may distribute this Software via magnetic and/or electronic means, but
  178.    you are specifically prohibited from:
  179.  
  180.                 - Charging fees or asking donations in exchange of or payment
  181.                   for copies of the Software.
  182.                 - Distributing this Software with commercial products without
  183.                   the written permission from the author.
  184.                 - Distributing this Software via a for-profit organization or
  185.                   group, either alone or with other Software.
  186.  
  187.    The unauthorized copying, decompiling or disassembling of this Software is
  188.    prohibited; any other use of this Software is prohibited without a written
  189.    permission in advance from the author.
  190.  
  191.  
  192.    WARRANTY DISCLAIMER
  193.  
  194.    The author cannot and does not warrant that any function contained in the
  195.    programs will meet your requirements, or that the operation will be error
  196.    free. The entire risk as to the Software performance or quality, or both,
  197.    is solely with the user and not the author. You assume responsibility for
  198.    the selection of the program to achieve your intended results and for the
  199.    installation, use, and results obtained from the Software.
  200.  
  201.    The author makes no warranty, either implied or expressed, including with-
  202.    out limitation any warranty with respect to this Software documented here,
  203.    its quality, performance, or fitness for a particular purpose. In no event
  204.    shall the author be liable to you for damages, whether direct or indirect,
  205.    incidental, special, or consequential arising out the use of or any defect
  206.    in the Software, even if the author has been advised of the possibility of
  207.    such damages, or for any claim by any other party.
  208.  
  209.    All other warranties of any kind, either express or implied,including but
  210.    not limited to the implied warranties of  merchantability and fitness for
  211.    for as a particular purpose, are expressly excluded.
  212.  
  213.  
  214.    LIMITATION OF REMEDIES
  215.  
  216.    The author's entire liability, and your exclusive remedy shall be: (1) the
  217.    replacement of an original Software diskette not meeting the above Limited
  218.    Warranty and which is returned to the author along with proof of purchase,
  219.    or (2), if the author is unable to deliver a replacement diskette which is
  220.    free of defects, you may terminate the License Agreement by returning this
  221.    Software and the corresponding license fee will be returned.
  222.  
  223.    By using the Software, you acknowledge (1) to have read and understood all
  224.    parts of this document and (2) to have agreed with and accepted all of its
  225.    provisions without any reservation.
  226.  
  227. --------------------------------------------------------------------------------
  228. [END]
  229.